<?php
class Fullhouse extends Vfriend_Db {
	var $cache;
	var $clear;
	public function __construct() {
		$this->cache		= new Vfriend_Cache();
		$this->clear 		= $this->cache->clear;
	}
	public function get($intUblastId) {
		try {
			$strKey 	= FULLHOUSE_GET . $intUblastId;
			$arrResult	= $this->cache->get($strKey);
			if(!Vfriend_Function::isCached($arrResult)) {
				$this->prepare('call ublasts_get(?)');
				$this->bindParam(1, $intUblastId, PDO::PARAM_INT, 11);
				$arrResult 	= $this->fetchAll();
				$this->cache->set($strKey, $arrResult, FULLHOUSE_GET_EXPIRE);
			}
			return isset($arrResult[0]) ? $arrResult[0] : null;
		} catch(Exception $e) {
			Vfriend_Function::logDb('Backend::Fullhouse::get - ' . $e->getMessage());
			return null;
		}
	}
	
}
?>